package cn.edu.neusoft.yyd208.foodorder.service;

import java.util.List;

import cn.edu.neusoft.yyd208.foodorder.bean.CollectBean;
import cn.edu.neusoft.yyd208.foodorder.bean.CollectListBean;
import cn.edu.neusoft.yyd208.foodorder.bean.CommentFoodBean;
import cn.edu.neusoft.yyd208.foodorder.bean.FoodBean;
import cn.edu.neusoft.yyd208.foodorder.bean.LoginBean;
import cn.edu.neusoft.yyd208.foodorder.bean.RegisterBean;
import cn.edu.neusoft.yyd208.foodorder.bean.ShopBean;
import retrofit2.Call;
import retrofit2.http.GET;
import retrofit2.http.Query;



public interface Service {
    @GET("userLogin.do")
    Call<LoginBean>
    getlogin(@Query("username") String username,
          @Query("userpass") String userpass);
    @GET("userRegister.do")
    Call<RegisterBean>
    getregister(@Query("username") String username,
                @Query("userpass") String userpass,
                @Query("mobilenum") String mobilenum,
                @Query("address") String address,
                @Query("comment") String comment);
    @GET("getAllShops.do")
    Call<List<ShopBean>>
    showShopList();
    @GET("getShopById.do")//3.2获取店铺详情
    Call<ShopBean> showShopinfo(
            @Query("shop_id")String shop_id
    );
    @GET("getFoodByShop.do")//3.3获取当前店铺所有菜单
    Call<List<FoodBean>>
    showFoodList(
            @Query("shop_id")String shop_id
    );
    @GET("getFoodById.do")
    Call<FoodBean>
    showFoodInfo(
            @Query("food_id")String food_id
    );
    @GET("insertOrder.do")
    Call<RegisterBean>
    getpurch(@Query("user_id") String user_id,
             @Query("food_id") String food_id,
             @Query("num") String num,
             @Query("sum") String sum,
             @Query("suggesttime") String suggesttime);
    @GET("getAllUserCollection.do")
    Call<List<CollectListBean>>
    showCollectList(@Query("user_id") String user_id,
                    @Query("flag") String flag);
    @GET("isCollected.do")
    Call<CollectBean>
    judge(@Query("user_id") String user_id,
          @Query("shop_food_id") String shop_food_id,
          @Query("flag") String flag);
    @GET("userCollectShop.do")
    Call<RegisterBean>
    collectshop(@Query("user_id") String user_id,
                @Query("shop_id") String shop_id);
    @GET("userCollectFood.do")
    Call<RegisterBean>
    collectfood(@Query("user_id") String user_id,
                @Query("food_id") String food_id);
    @GET("getFoodBySearch.do")
    Call<List<FoodBean>>
    research(@Query("search") String search);
    @GET("updateUserById.do")
    Call<RegisterBean>
    modify(@Query("user_id") String user_id,
           @Query("username") String username,
           @Query("userpass") String userpass,
           @Query("mobilenum") String mobilenum,
           @Query("address") String address);
    @GET("getAllUserFoodOrder.do")
    Call<List<CommentFoodBean>>
    showCommentFood(@Query("food_id") String food_id);
    @GET("getAllUserOrder.do")
    Call<List<CommentFoodBean>>
    showUserOrder(@Query("user_id") String user_id);
    @GET("getAllUserComment.do")
    Call<List<CommentFoodBean>>
    showUserComment(@Query("user_id") String user_id);
    @GET("insertComment.do")
    Call<RegisterBean>
    addcomment(@Query("order_id") String order_id,
               @Query("content") String content);
    @GET("updateComment.do")
    Call<RegisterBean>
    updatecomment(@Query("order_id") String order_id,
                  @Query("content") String content);
    @GET("deleteComment.do")
    Call<RegisterBean>
    deletecomment(@Query("order_id") String order_id);

}
